import { get, post } from '@/utils/Http'
import port from './port'
//获取基础数据
export function GetData (actid) {
  return post(`${port.show.GetData}/${actid}`.trim())
}
//抽奖优惠
export function GetLotteryDiscount (actid) {
  16
  return get(`${port.show.GetLotteryDiscount}/${actid}`.trim())

}
//限定奖励列表
export function GetLimitedDetail (actid) {

  return get(`${port.show.GetLimitedDetail}/${actid}`.trim())

}

//中奖名单列表
export function GetAwardList (actid) {

  return get(`${port.show.GetAwardList}/${actid}`.trim())

}
//购买 
export function BuyTicket (actid, num) {

  return get(`${port.show.BuyTicket}/${actid}?ct=${num}`.trim())

}
//支付轮训接口
export function HasPayedOrder (actid, log_id) {
  return get(`${port.show.HasPayedOrder}/${actid}?log_id=${log_id}`.trim())

}

//单抽
export function LotteryOne (actid) {
  return get(`${port.show.LotteryOne}/${actid}`.trim())
}
//十抽
export function LotteryTen (actid) {
  return get(`${port.show.LotteryTen}/${actid}`.trim())
}
//抽奖优惠券兑换
export function LotteryDiscountCharge (actid) {
  return get(`${port.show.LotteryDiscountCharge}/${actid}`.trim())
}
//抽奖优惠券兑换
export function RcvLimitedGift (actid, sort) {
  return get(`${port.show.RcvLimitedGift}/${actid}?sort=${sort}`.trim())
}
//中奖记录
export function GetUserLotteryLog (actid, page_index, page_size) {

  return get(`${port.show.GetUserLotteryLog}/${actid}?page_index=${page_index}&page_size=${page_size}`.trim())
}
//获取限定奖励领取日志
export function GetLimitedHistory (actid) {
  return get(`${port.show.GetLimitedHistory}/${actid}`.trim())
}
//免费奖券 消耗 兑换记录
export function GetFreeLotteryLogByType (actid, tp, page_index, page_size) {
  return get(`${port.show.GetFreeLotteryLogByType}/${actid}?tp=${tp}&page_index=${page_index}&page_size=${page_size}`.trim())
}
//购买记录
export function GetOrders (actid, obj) {
  return post(`${port.show.GetOrders}/${actid}`.trim(), obj)
}
//活动中心
export function GetAllActivity (actid) {
  return get(`${port.cm.GetAllActivity}?mid=${actid}`.trim())
}

//登录接扣
export function GetUserId (actid) {
  return get(`${port.show.GetUserId}/${actid}`.trim())
}